package constants

import (
	"gozero-demo/internal/types"
	"gozero-demo/internal/utils"
)

var (
	// 系统基本错误码 1001*
	CodeSuccess                    = types.NewMyError(0, "请求成功") // 老系统使用 200000
	CodeParamsEmpty                = types.NewMyError(1001400, "参数为空")
	CodeParamsError                = types.NewMyError(1001401, "参数错误")
	CodeParamsValidationFail       = types.NewMyError(1001402, "参数验证失败")
	CodeParamsFormatConversionFail = types.NewMyError(1001403, "参数格式转换失败")
	CodeServerError                = types.NewMyError(1001500, "服务器异常")
	CodeUnknown                    = types.NewMyError(1001501, "未知错误")
	SystemDataError                = types.NewMyError(1001510, "系统数据错误")
	SystemDataFormatConversionFail = types.NewMyError(1001511, "系统数据格式转换失败")
	TransactionStartFail           = types.NewMyError(1001512, "事务启动失败")
	PanicOccurred                  = types.NewMyError(1001555, "Program occurred panic!")
	ConcurrentProgramError         = types.NewMyError(1001557, "并发程序错误")
	DataNotFound                   = types.NewMyError(400500, "当前数据未找到")

	//用户和权限相关错误码
	CodeNotLogin     = utils.NewMyError(300010, "未登录")
	CodeAuthExpired  = utils.NewMyError(300020, "登录已过期,请重新登录")
	UserDataNotFound = types.NewMyError(300100, "当前用户数据未找到")

	//请求三方业务的错误返回
	CodeQywxError = utils.NewMyError(310010, "请求企业微信接口返回错误")
)
